<?php error_reporting(0); session_start(); include('include/function.php');?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>DCMS :: Document Control Management System</title>

<link href="css/style.css" rel="stylesheet" type="text/css" />

<link href="css/menu_style.css" rel="stylesheet" type="text/css" />

<link href="css/ui.all.css" rel="stylesheet" type="text/css" />

<?php if($_GET['open']=='window') { ?>
<style>
body, #topnav {
	background:none;	
}
</style>
<?php } ?>

<link rel="Shortcut Icon" type="image/x-icon" href="images/favicon.ico.png">

<script type="text/javascript" src="js/jquery.js"></script>

<script type="text/javascript" src="js/jqueryui.js"></script>

<!--<script type="text/javascript" src="js/adminmenu.js"></script>-->

<script type="text/javascript" src="js/jquery.min.js"></script>

<script type="text/javascript" src="js/jconfirmaction.jquery.js"></script>

<script type="text/javascript" src="js/jquery.maskedinput-1.2.2.js"></script>

<script type="text/javascript" src="js/jquery-1.4.js"></script>

<script type="text/javascript" src="js/jquery.autocomplete.js"></script>

<link rel="stylesheet" type="text/css" href="css/jquery.autocomplete.css" />

<script type="text/javascript">

	$(document).ready(function() {

		$('.ask').jConfirmAction();

	});

	$(function(){

		// striped table

		$(".tableform tr:nth-child(even)").addClass("rowhighlight");

		$("form table tr:nth-child(even)").addClass("rowhighlight");

		$(".datatable tr:nth-child(even)").addClass("rowhighlight");

		$("form table tr:nth-child(even)").addClass("rowhighlight");

   });

	jQuery(function($){

   		$("#ip").mask("999.99.999.999 / 999.99.999.999");

		$(".jam").mask("99:99");
		
		$(".nkontrak").mask("999/AA/AAA/Corp-BDP/AA/9999");

   });

</script>

<SCRIPT language=JavaScript>

var win = null;

function NewWindow(mypage,myname,w,h,scroll){

LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;

TopPosition = (screen.height) ? (screen.height-h)/2 : 0;

settings =

'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable,menubar=yes'

win = window.open(mypage,myname,settings)

}

</SCRIPT>

<?php include('js/menu_js.php');?>

<style media="print">

body {

	background:#FFFFFF;

}

.hide, #mynotes, #topnav, #welcome, #logo_container, #navigation, #box-exportdata, #footer {

	display:none;

}

</style>

</head>
	
<body>
<div id= "top_header">
        <div id="date"><img src="images/time_26.png" width="12" />&nbsp; <?php  echo  date("l - d M Y");  
                    ?>
                    
        </div>
</div> 
<div id="header"> 
        <div class="header_title">
           <h1 id="header"><a href="index.php" title="Document Control Management System">Document Control Management System</a></h1> 
        </div>
      
        
    
           <?php  if(isset($_SESSION[admin])) {
          ?>
                  <a href="logout.php" title="logout">
            <div class='header_logout'>
            <div class='img_user'>
              <img src='images/logout_48.png' alt='image user'>
            </div>
            <br />
                        <span style="text-align:center; display:block">LOGOUT</span> 
                    </div>
                    </a>
              <?php   
        echo "<div class='header_user'>";    
        echo "
            <div class='img_user'>
              <img src='images/user_64.png' alt='image user'>
            </div>
          ";
        ?><span>Welcome ,</span> <strong> <?php echo ucfirst($_SESSION[admin]);
        ?>
                <!--
                  </strong>&nbsp;&nbsp;  <a id="red" href="logout.php" title="Logout"> [ Logout ]</a> 
        -->
          </div>
                    
        <?php 
         }else{ ?>&nbsp;<?php }  ?>
  
</div>


<div id="mynotes"><textarea id="mynotesbox" rows="15" cols="80">DCMS :: Document Control Management System</textarea><br /><input type="button" value="Save" id="savenotes" /></div>

<?php if(empty($_GET['open'])) { ?>

<?php if(isset($_SESSION[admin])) { ?>
<div id="navigation">


    <ul class="menuH decor1" style="border:none;">

    <?php 
        if(strstr($_SESSION[akses],"A-1-4")) 
        { 
    ?>

            <li class="root-menu">
                    <a href="#" class="arrow-root">
                        <img class="icon_menu" src="images/icn_setting.png"/>Setting
                    </a>

                  <ul>

                    	<?php if(strstr($_SESSION[akses],"A-1-4"))   
                       { 
                      ?>

                              	<li>
                                    <a href="index.php?component=user">
                                          <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;Set Username / Password
                                    </a>
                                </li>  <!-- end of li Username / Password --> 

                    	<?php 
                      } 
                      ?>

    	               <?php if(strstr($_SESSION[akses],"A-1-4") or strstr($_SESSION[akses],"B-5"))   
                            { 
                      ?>

        	                     <li>
                                  <a href="index.php?component=perusahaan">
                                      <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;
                                      Tentang Perusahaan
                                  </a>
                                </li> <!-- end of li Tentang Perusahaan --> 
    	               <?php 
                            } 
                      ?> 

                     <?php if(strstr($_SESSION[akses],"A-1-4") OR strstr($_SESSION[akses],"A-4")) 
                            { 
                      ?>
        	                     <li>
                                  <a class="arrow">
                                      <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;
                                      Master Document
                                  </a>

                                      <ul>

                                      	<?php if(strstr($_SESSION[akses],"A-1") OR strstr($_SESSION[akses],"A-4")) 
                                              { 
                                        ?>
                                      	         <li>
                                                      <a href="index.php?component=dstatus">
                                                          <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;Status Document
                                                      </a>
                                                  </li>
                                          <?php
                                               } 
                                          ?>

                                          <?php if(strstr($_SESSION[akses],"A-1-4") OR strstr($_SESSION[akses],"A-4")) 
                                              { 
                                          ?>

                                                  <li>
                                                        <a href="index.php?component=dkategori">
                                                          <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;Kategori Document
                                                        </a>
                                                  </li>

                                          <?php 
                                              } 
                                          ?>

                                          <?php if(strstr($_SESSION[akses],"A-1-4") OR strstr($_SESSION[akses],"A-4")) 
                                              {
                                          ?>
                                                  <li>
                                                        <a href="index.php?component=djenis">
                                                          <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;Jenis Document
                                                        </a>
                                                  </li>

                                          <?php 
                                              } 
                                          ?>
                                      </ul>

                                </li> <!-- end of li master document --> 
                        <?php 
                          } 
                        ?>
                     <?php if(strstr($_SESSION[akses],"A-1-4") OR strstr($_SESSION[akses],"B-4"))  
                          { 
                     ?>

                            <li>
                                <a class="arrow">
                                    <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;
                                    Master Karyawan
                                </a>

                                  <ul>
                                  		<?php if(strstr($_SESSION[akses],"A-1-4") OR strstr($_SESSION[akses],"B-3")) 
                                            { 
                                      ?>

                                            	<li>
                                                  <a href="index.php?component=unitbisnis">
                                                      <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;Unit Bisnis
                                                  </a>
                                              </li>
                                      <?php 
                                            } 
                                      ?>
                                  		<?php if(strstr($_SESSION[akses],"A-1-4") OR strstr($_SESSION[akses],"B-2")) 
                                            { 
                                      ?>

                                      	       <li>
                                                  <a href="index.php?component=unitkerja">
                                                      <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;
                                                      Unit Kerja
                                                  </a>
                                                </li>

                                      <?php 
                                            } 
                                      ?>

                                      <?php if(strstr($_SESSION[akses],"A-1-4") OR strstr($_SESSION[akses],"B-3")) 
                                            { 
                                      ?>
                                              <li>
                                                  <a href="index.php?component=kontak">
                                                      <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;Data Karyawan
                                                  </a>
                                              </li>

                                      <?php 
                                            } 
                                      ?>

                                  </ul>

                            </li> <!-- end of li master karyawan --> 

                          <?php } ?>

                      	<?php if(isset($_SESSION['admin'])) { ?>
                          
                              <li>
                                  <a href="logout.php">
                                      <img src="images/alert2.png" align="left" hspace="1" vspace="4" width="18"/>&nbsp;
                                      Keluar
                                  </a>
                              </li> 
                          
                              <!-- end of li Logout --> 

                      	<?php 
                              } 
                        ?>
                  
                  </ul>  <!-- end of ul child setting --> 
             </li>  <!-- end of li  setting --> 

          <?php 
             } 
          ?>
            <li class="root-menu">
                <a href="javascript:void(0);" class="arrow-root">
                  <img class="icon_menu" src="images/icn_douments.png"/>
                  Document
                </a>
                  <ul>
                      <li>
                          <a class="arrow">
                              <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;
                              Pengajuan
                          </a>
                            <ul>
                      	       <li>
                                  <a href="index.php?component=pengajuanpenambahan">
                                      <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;Document Baru
                                  </a>
                               </li>
                               <li>
                                  <a href="index.php?component=pengajuanrevisi">
                                      <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;
                                      Revisi Document
                                  </a>
                               </li>
                            </ul> <!-- end of ul child pengajuan --> 
                      </li>       <!-- end of li  pengajuan --> 
          <?php if(strstr($_SESSION[akses],"A-1-4") OR strstr($_SESSION[akses],"A-4")) 
                { 
          ?>
                      <li>
                          <a href="index.php?component=document">
                              <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;
                              Kelola Document
                          </a>
                      </li> <!-- end of li  Kelola document --> 
          <?php 
                 } 
          ?>
          <?php if(strstr($_SESSION[akses],"A-1-4") OR strstr($_SESSION[akses],"distribusi")) 
                { 
          ?>
                      <li>
                          <a href="index.php?component=distribusi">
                              <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;
                              Distribusi Document
                          </a>
                      </li>
                  </ul> <!-- end of ul child Document --> 
            </li> <!-- end of li  Document --> 
<?php 
                 } 
          ?>

        <?php 
              { 
         ?>
            <li class="root-menu">
                <a href="javascript:void(0);" class="arrow-root">
                  Laporan
                </a>

                  <ul>

                  	<?php if(strstr($_SESSION[akses],"L-5")) 
                          { 
                    ?>
                  	   <li>
                          <a href="index.php?component=xx">
                            <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;
                            Pengajuan
                          </a>
                        </li> <!-- end of li  Pengajuan --> 
                    <?php 
                          } 
                    ?>
                    <?php if(strstr($_SESSION[akses],"L-1")) 
                          { 
                    ?>
                       <li>
                          <a href="index.php?component=rugilaba">
                              <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;
                              Rekaman Mutu
                          </a>
                       </li> <!-- end of li  Rekaman Mutu --> 
                    <?php 
                          } 
                    ?>
                    <?php if(strstr($_SESSION[akses],"L-3")) { ?>

                       <li>
                          <a href="index.php?component=neraca">
                            <img src="images/invoices.png" align="left" hspace="1" vspace="4"/>&nbsp;
                            History Document
                          </a>
                       </li> <!-- end of li  History Document --> 
                   <?php 
                          } 
                    ?>
                  </ul> <!-- end of ul child Laporan --> 
            </li>       <!-- end of li Laporan --> 

          <?php 
              } 
          ?>
            <li class="root-menu">
                <a href="index.php?component=xxx" class="arrow-root">
                    <img class="icon_menu" src="images/icn_audits.png"/>
                    I Auditor
                </a>
            </li>

            <li class="root-menu">
                <a href="index.php?component=copyright" class="arrow-root">&copy; 
                    Copyright
                </a>
            </li>

    </ul> <!-- end of ul menuH decor1 --> 

</div> <!-- END OF NAVIGATION --> 
  <?php 
    } 
  ?>
<?php 
  } 
?>

<div id="content_container">

  <div id="content">

  <?php getBody($_SESSION[admin],$_GET[component],$_GET[task]);?>

  </div>

  <div class="clear" style="margin-bottom:45px;"></div>

</div>

<?php //if(isset($_SESSION[admin])) { ?>

<div id="footer">Copyright &copy; <a href="#" target="_blank">IT Development - Cipaganti</a>.  All Rights Reserved.</div>

<?php //} ?>

</body>

</html>